

from SubThread.WindowSizeChageEvenet import WindowSizeChageEvenet



class AutoPlaceChara(WindowSizeChageEvenet):
    """
    DESCIRPT:
        WindowSizeChageEvent的子类
    SCRIPT:
        当窗口大小变化的时候 对窗口的人物详细进行重新的布局
    """
    def __init__(self, wm, chara, callback):
        super().__init__(wm)
        self.chara = chara
        self.SqTime = .000001
        self.callback = callback

    def overValidate(self):
        return self.mw.state != "人物角色详细页"

    def threadBody(self):
        print('【threadBody】被执行')
        self.callback(self.mw, self.chara)

